home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Freeware 2001 May
/
SGI Freeware 2001 May - Disc 2.iso
/
dist
/
fw_libglade.idb
/
usr
/
freeware
/
bin
/
libglade-config.z
/
libglade-config
Wrap
Text File
|
2001-04-12
|
4KB
|
159 lines
#! /bin/sh
prefix=${ROOT}/usr/freeware
exec_prefix=${prefix}
includedir=${prefix}/include
usage()
{
cat <<EOF
Usage: libglade-config [OPTION] [LIBRARIES]
Known values for OPTION are:
--prefix=DIR change libglade prefix [default $prefix]
--libs print library linking information
--cflags print pre-processor and compiler flags
--check just check for library.
--help display this help and exit
--version output version information
Possible widget libraries:
gtk (included by default)
gnome
bonobo
gnomedb
EOF
exit $1
}
if test $# -eq 0; then
usage 1
fi
cflags=false
libs=false
lib_gtk=yes
lib_gnome=no
lib_bonobo=no
lib_gnomedb=no
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case "$1" in
--prefix=*)
prefix=$optarg
;;
--prefix)
echo $prefix
;;
--version)
echo libglade 0.16
exit 0
;;
--help)
usage 0
;;
--cflags)
echo_cflags=yes
;;
--libs)
echo_libs=yes
;;
--check)
;;
gtk)
lib_gtk=yes
;;
gnome)
lib_gnome=yes
;;
bonobo)
lib_gnome=yes # bonobo implies gnome
lib_bonobo=yes
;;
gnomedb) # gnomedb implies gnome
lib_gnome=yes
lib_gnomedb=yes
;;
*)
usage 1 1>&2
exit 1
;;
esac
shift
done
# This is uncommented when we have no GNOME support ...
#if test "$lib_gnome" = "yes"; then
# echo "*** GNOME support was not compiled into libglade" 1>&2
# exit 1
#fi
# This is uncommented when we have no BONOBO support ...
if test "$lib_bonobo" = "yes"; then
echo "*** Bonobo support was not compiled into libglade" 1>&2
exit 1
fi
# This is uncommented when we have no GNOME-DB support ...
if test "$lib_gnomedb" = "yes"; then
echo "*** GNOME-DB support was not compiled into libglade" 1>&2
exit 1
fi
if test "$echo_cflags" = "yes"; then
cflags="-I${ROOT}/usr/freeware/include/gnome-xml"
if test "${prefix}/include" != /usr/include; then
cflags="$cflags -I${prefix}/include"
fi
if test "$lib_bonobo" = "yes"; then
cflags="$cflags "
elif test "$lib_gnomedb" = "yes"; then
cflags="$cflags "
elif test "$lib_gnome" = "yes"; then
cflags="$cflags -I${ROOT}/usr/freeware/include -DNEED_GNOMESUPPORT_H -I${ROOT}/usr/freeware/${ABILIB-lib32}/gnome-libs/include -I${ROOT}/usr/freeware/include/glib-1.2 -I${ROOT}/usr/freeware/${ABILIB-lib32}/glib/include -I${ROOT}/usr/freeware/include/gtk-1.2"
else
cflags="$cflags -I${ROOT}/usr/freeware/include/gtk-1.2 -I${ROOT}/usr/freeware/include/glib-1.2 -I${ROOT}/usr/freeware/${ABILIB-lib32}/glib/include"
fi
echo $cflags
fi
if test "$echo_libs" = "yes"; then
libs=""
libsa=""
if test "$lib_gtk" = "yes"; then
libs="-lglade"
libsa="-L${ROOT}/usr/freeware/${ABILIB-lib32} -lgtk -lgdk -lgmodule -lglib -lXi -lXext -lX11 -lm"
fi
if test "$lib_gnome" = "yes"; then
libs="-lglade-gnome $libs"
libsa="-L${ROOT}/usr/freeware/${ABILIB-lib32} -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudio -laudiofile -lm -ldb -lglib"
fi
if test "$lib_bonobo" = "yes"; then
libs="-lglade-bonobo $libs"
libsa="-L${ROOT}/usr/freeware/${ABILIB-lib32} "
fi
if test "$lib_gnomedb" = "yes"; then
libs="-lglade-gnomedb $libs"
libsa="-L${ROOT}/usr/freeware/${ABILIB-lib32} "
fi
echo -L${ROOT}/usr/freeware/${ABILIB-lib32} $libs -L${ROOT}/usr/freeware/${ABILIB-lib32} -lxml -lz $libsa
fi
exit 0